<!--!
This file is a part of MediaDrop (http://www.mediadrop.net),
Copyright 2009-2013 MediaCore Inc., Felix Schwarz and other contributors.
For the exact contribution history, see the git revision log.
The source code contained in this file is licensed under the GPLv3 or
(at your option) any later version.
See LICENSE.txt in the main project directory, for more information.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      i18n:domain="mediacore"
      py:strip="">

<body py:match="body" py:attrs="h.append_class_attr(select('@*'), 'menu-settings-on')">
	<!--! We're just adding the 'menu-settings-on' class to highlight the right nav button -->
	<div py:replace="select('*|text()')" />
</body>

<xi:include href="../master.html" />

<head py:match="head">
	<meta py:replace="select('*')"/>
	<link href="${h.url_for('/admin/styles/settings.css')}" media="screen" rel="stylesheet" type="text/css" />
</head>

<div id="body" py:match="div[@id='body']">
	<div class="lft-column33" py:with="
		current_url = h.url_for();
		plugin_links = sorted(g.events.plugin_settings_links(), key=lambda (text, link): text.lower());
	">
		<div class="box">
			<h1 class="box-head">Settings</h1>
			<ul class="box-content settings-menu">
				<li py:with="link = h.url_for(controller='/admin/settings', action='general')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">General</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='advertising')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Advertising</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='analytics')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Analytics</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='appearance')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Appearance</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/categories')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Categories</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='comments')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Comments</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='api')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Data API</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='notifications')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Notifications</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/players')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Players</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='popularity')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Popularity</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='sitemaps')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">RSS and Sitemaps</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/storage')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Storage Engines</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/tags')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Tags</a>
				</li>
				<li py:with="link = h.url_for(controller='/admin/settings', action='upload')">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">Upload</a>
				</li>
			</ul>
		</div>
		<div class="box" py:if="plugin_links">
			<h1 class="box-head">Plugins</h1>
			<ul class="box-content settings-menu">
				<li py:for="text, link in plugin_links">
					<a href="${link}" class="${current_url.startswith(link) and 'selected' or None}">${text}</a>
				</li>
			</ul>
		</div>
	</div>
	<div class="rgt-column66">
		<div py:replace="select('*|text()')" />
	</div>
</div>

</html>
